Optimal. Leaf size=305 \[ -\frac {4 a \left (24 a^2 C+35 A b^2+22 b^2 C\right ) \sqrt {a+b \cos (c+d x)} E\left (\frac {1}{2} (c+d x)|\frac {2 b}{a+b}\right )}{105 b^4 d \sqrt {\frac {a+b \cos (c+d x)}{a+b}}}+\frac {2 \left (24 a^2 C+5 b^2 (7 A+5 C)\right ) \sin (c+d x) \sqrt {a+b \cos (c+d x)}}{105 b^3 d}+\frac {2 \left (48 a^4 C+2 a^2 b^2 (35 A+16 C)+5 b^4 (7 A+5 C)\right ) \sqrt {\frac {a+b \cos (c+d x)}{a+b}} F\left (\frac {1}{2} (c+d x)|\frac {2 b}{a+b}\right )}{105 b^4 d \sqrt {a+b \cos (c+d x)}}-\frac {12 a C \sin (c+d x) \cos (c+d x) \sqrt {a+b \cos (c+d x)}}{35 b^2 d}+\frac {2 C \sin (c+d x) \cos ^2(c+d x) \sqrt {a+b \cos (c+d x)}}{7 b d} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.59, antiderivative size = 305, normalized size of antiderivative = 1.00, number of steps used = 8, number of rules used = 8, integrand size = 35, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.229, Rules used = {3050, 3049, 3023, 2752, 2663, 2661, 2655, 2653} \[ \frac {2 \left (24 a^2 C+5 b^2 (7 A+5 C)\right ) \sin (c+d x) \sqrt {a+b \cos (c+d x)}}{105 b^3 d}+\frac {2 \left (2 a^2 b^2 (35 A+16 C)+48 a^4 C+5 b^4 (7 A+5 C)\right ) \sqrt {\frac {a+b \cos (c+d x)}{a+b}} F\left (\frac {1}{2} (c+d x)|\frac {2 b}{a+b}\right )}{105 b^4 d \sqrt {a+b \cos (c+d x)}}-\frac {4 a \left (24 a^2 C+35 A b^2+22 b^2 C\right ) \sqrt {a+b \cos (c+d x)} E\left (\frac {1}{2} (c+d x)|\frac {2 b}{a+b}\right )}{105 b^4 d \sqrt {\frac {a+b \cos (c+d x)}{a+b}}}-\frac {12 a C \sin (c+d x) \cos (c+d x) \sqrt {a+b \cos (c+d x)}}{35 b^2 d}+\frac {2 C \sin (c+d x) \cos ^2(c+d x) \sqrt {a+b \cos (c+d x)}}{7 b d} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 2653
Rule 2655
Rule 2661
Rule 2663
Rule 2752
Rule 3023
Rule 3049
Rule 3050
Rubi steps
\begin {align*} \int \frac {\cos ^2(c+d x) \left (A+C \cos ^2(c+d x)\right )}{\sqrt {a+b \cos (c+d x)}} \, dx &=\frac {2 C \cos ^2(c+d x) \sqrt {a+b \cos (c+d x)} \sin (c+d x)}{7 b d}+\frac {2 \int \frac {\cos (c+d x) \left (2 a C+\frac {1}{2} b (7 A+5 C) \cos (c+d x)-3 a C \cos ^2(c+d x)\right )}{\sqrt {a+b \cos (c+d x)}} \, dx}{7 b}\\ &=-\frac {12 a C \cos (c+d x) \sqrt {a+b \cos (c+d x)} \sin (c+d x)}{35 b^2 d}+\frac {2 C \cos ^2(c+d x) \sqrt {a+b \cos (c+d x)} \sin (c+d x)}{7 b d}+\frac {4 \int \frac {-3 a^2 C+\frac {1}{2} a b C \cos (c+d x)+\frac {1}{4} \left (24 a^2 C+5 b^2 (7 A+5 C)\right ) \cos ^2(c+d x)}{\sqrt {a+b \cos (c+d x)}} \, dx}{35 b^2}\\ &=\frac {2 \left (24 a^2 C+5 b^2 (7 A+5 C)\right ) \sqrt {a+b \cos (c+d x)} \sin (c+d x)}{105 b^3 d}-\frac {12 a C \cos (c+d x) \sqrt {a+b \cos (c+d x)} \sin (c+d x)}{35 b^2 d}+\frac {2 C \cos ^2(c+d x) \sqrt {a+b \cos (c+d x)} \sin (c+d x)}{7 b d}+\frac {8 \int \frac {\frac {1}{8} b \left (35 A b^2-12 a^2 C+25 b^2 C\right )-\frac {1}{4} a \left (35 A b^2+24 a^2 C+22 b^2 C\right ) \cos (c+d x)}{\sqrt {a+b \cos (c+d x)}} \, dx}{105 b^3}\\ &=\frac {2 \left (24 a^2 C+5 b^2 (7 A+5 C)\right ) \sqrt {a+b \cos (c+d x)} \sin (c+d x)}{105 b^3 d}-\frac {12 a C \cos (c+d x) \sqrt {a+b \cos (c+d x)} \sin (c+d x)}{35 b^2 d}+\frac {2 C \cos ^2(c+d x) \sqrt {a+b \cos (c+d x)} \sin (c+d x)}{7 b d}-\frac {\left (2 a \left (35 A b^2+24 a^2 C+22 b^2 C\right )\right ) \int \sqrt {a+b \cos (c+d x)} \, dx}{105 b^4}+\frac {\left (48 a^4 C+5 b^4 (7 A+5 C)+2 a^2 b^2 (35 A+16 C)\right ) \int \frac {1}{\sqrt {a+b \cos (c+d x)}} \, dx}{105 b^4}\\ &=\frac {2 \left (24 a^2 C+5 b^2 (7 A+5 C)\right ) \sqrt {a+b \cos (c+d x)} \sin (c+d x)}{105 b^3 d}-\frac {12 a C \cos (c+d x) \sqrt {a+b \cos (c+d x)} \sin (c+d x)}{35 b^2 d}+\frac {2 C \cos ^2(c+d x) \sqrt {a+b \cos (c+d x)} \sin (c+d x)}{7 b d}-\frac {\left (2 a \left (35 A b^2+24 a^2 C+22 b^2 C\right ) \sqrt {a+b \cos (c+d x)}\right ) \int \sqrt {\frac {a}{a+b}+\frac {b \cos (c+d x)}{a+b}} \, dx}{105 b^4 \sqrt {\frac {a+b \cos (c+d x)}{a+b}}}+\frac {\left (\left (48 a^4 C+5 b^4 (7 A+5 C)+2 a^2 b^2 (35 A+16 C)\right ) \sqrt {\frac {a+b \cos (c+d x)}{a+b}}\right ) \int \frac {1}{\sqrt {\frac {a}{a+b}+\frac {b \cos (c+d x)}{a+b}}} \, dx}{105 b^4 \sqrt {a+b \cos (c+d x)}}\\ &=-\frac {4 a \left (35 A b^2+24 a^2 C+22 b^2 C\right ) \sqrt {a+b \cos (c+d x)} E\left (\frac {1}{2} (c+d x)|\frac {2 b}{a+b}\right )}{105 b^4 d \sqrt {\frac {a+b \cos (c+d x)}{a+b}}}+\frac {2 \left (48 a^4 C+5 b^4 (7 A+5 C)+2 a^2 b^2 (35 A+16 C)\right ) \sqrt {\frac {a+b \cos (c+d x)}{a+b}} F\left (\frac {1}{2} (c+d x)|\frac {2 b}{a+b}\right )}{105 b^4 d \sqrt {a+b \cos (c+d x)}}+\frac {2 \left (24 a^2 C+5 b^2 (7 A+5 C)\right ) \sqrt {a+b \cos (c+d x)} \sin (c+d x)}{105 b^3 d}-\frac {12 a C \cos (c+d x) \sqrt {a+b \cos (c+d x)} \sin (c+d x)}{35 b^2 d}+\frac {2 C \cos ^2(c+d x) \sqrt {a+b \cos (c+d x)} \sin (c+d x)}{7 b d}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A] time = 0.91, size = 217, normalized size = 0.71 \[ \frac {2 b \sin (c+d x) (a+b \cos (c+d x)) \left (48 a^2 C-36 a b C \cos (c+d x)+70 A b^2+15 b^2 C \cos (2 (c+d x))+65 b^2 C\right )+4 \sqrt {\frac {a+b \cos (c+d x)}{a+b}} \left (b \left (-12 a^2 b C+35 A b^3+25 b^3 C\right ) F\left (\frac {1}{2} (c+d x)|\frac {2 b}{a+b}\right )-2 a \left (24 a^2 C+35 A b^2+22 b^2 C\right ) \left ((a+b) E\left (\frac {1}{2} (c+d x)|\frac {2 b}{a+b}\right )-a F\left (\frac {1}{2} (c+d x)|\frac {2 b}{a+b}\right )\right )\right )}{210 b^4 d \sqrt {a+b \cos (c+d x)}} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [F] time = 0.78, size = 0, normalized size = 0.00 \[ {\rm integral}\left (\frac {C \cos \left (d x + c\right )^{4} + A \cos \left (d x + c\right )^{2}}{\sqrt {b \cos \left (d x + c\right ) + a}}, x\right ) \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [F] time = 0.00, size = 0, normalized size = 0.00 \[ \int \frac {{\left (C \cos \left (d x + c\right )^{2} + A\right )} \cos \left (d x + c\right )^{2}}{\sqrt {b \cos \left (d x + c\right ) + a}}\,{d x} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [B] time = 2.63, size = 1131, normalized size = 3.71 \[ \text {result too large to display} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [F] time = 0.00, size = 0, normalized size = 0.00 \[ \int \frac {{\left (C \cos \left (d x + c\right )^{2} + A\right )} \cos \left (d x + c\right )^{2}}{\sqrt {b \cos \left (d x + c\right ) + a}}\,{d x} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [F] time = 0.00, size = -1, normalized size = -0.00 \[ \int \frac {{\cos \left (c+d\,x\right )}^2\,\left (C\,{\cos \left (c+d\,x\right )}^2+A\right )}{\sqrt {a+b\,\cos \left (c+d\,x\right )}} \,d x \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [F(-1)] time = 0.00, size = 0, normalized size = 0.00 \[ \text {Timed out} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________